<?php


include_once "../../../../lib/import.php";

$window = new WBResizableWindow(array(
	'title' => 'TabControl',
	'width' => 300,
	'height' => 300,
	'layout' => 'full'
));

$tab = $window->add(array(
	'wbtype' => 'TabControl',
	'width' => 300,
	'height' => 280,
	'name' => 'Test'
));

// add tab 1 
$tab->addTab('page1', 'grid columns=2 rows=2');

$panel = $tab->add('grid columns=2 rows=2');

for ($i = 0; $i < 4; $i++) { 
$panel->add(array(
	'wbtype' => 'PushButton',
	'caption' => 'test('.$i.')'
));
}

// add tab 2
$tab->addTab('page2', 'full');

$tab->add(array(
	'wbtype' => 'PushButton',
	'caption' => 'tabs',
	'ntab' => 'page2'
));

// add tab page 
$page = $tab->addPage('page3', 'grid columns=3 rows=2');
$page->add(array(
	'wbtype' => 'PushButton',
	'caption' => 'love',
	'event' => array(
		'click' => function($eo) { wbdialog('info', $eo->object()->text); }
	)
));

// add tab page 
$page = $tab->addPage('page4', 'grid columns=3 rows=2');
// add tab page 
$page = $tab->addPage('page5', 'grid columns=3 rows=2');
// add tab page 
$page = $tab->addPage('page6', 'grid columns=3 rows=2');
// add tab page 
$page = $tab->addPage('page7', 'grid columns=3 rows=2');

$window->visible = true;
wbstart();



?>